<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

</body>
<script src="./node_modules/axios/dist/axios.js"></script>
<script type="module">
    import axios from "./index.js";
    axios.defaults.baseURL = "http://zhangpeiyue.com";
    axios.defaults.timeout = 3000;
    axios({
        method:"post",
        url: "/scoreList",
        headers:{
            userName:"zhangsan",
            age:12
        },
        // 设置请求体，格式：application/json
        // data:{
        //     a:1,
        //     b:2
        // },
        // 设置请求体，格式：application/x-www-form-urlencoded
        data:"one=1&two=2"
    }).then(value => {
        console.log(value.data)
    }).catch(err => {
        console.log("err",err);
    })


</script>
</html>